# -*- coding: utf-8 -*-

from django.conf.urls import *
from django.http import HttpResponse
from django.shortcuts import render

from TestModel.models import Test
from TestModel.models import Users

# 数据库操作
def testdb(request):
	test1 = Test(name='w3cschool.cc',age=16)
	test1.save()
	return HttpResponse("<p>数据添加成功！</p>")

def queryUser(request):
    list = [];
    list = Users.objects.all();
    context = {};
    context['list'] = list;
    return render(request, 'query.html', context)

